<?php
/**
 * Created by PHPStorm
 * User: xiest
 * Date: 2021/9/17
 * Email: <939369942@qq.com>
 */
namespace basic\jobs;

use app\common\repositories\user\UserCurrencyRecordRepository;
use basic\interfaces\JobInterface;
use think\facade\Log;

class CurrencyExtensionJob implements JobInterface
{

    public function fire($job, $data)
    {
        try {
            /**@var $make UserCurrencyRecordRepository**/
            $make = app()->make(UserCurrencyRecordRepository::class);
            $make->extensionCurrency($data);

        }catch (\Exception $e){
            Log::info('工程币使用分销:'.var_export($data,true)."[{$e->getMessage()}]");
        }
        $job->delete();
    }

    public function failed($data)
    {
        // TODO: Implement failed() method.
    }
}